import { IsNotEmpty, IsString, MinLength } from 'class-validator';

export class CreateUserDto {
  @IsNotEmpty({ message: '名字不能为空' })
  @IsString({ message: '名字必须是字符串' })
  name: string;

  @IsNotEmpty({ message: '账号不能为空' })
  @IsString({ message: '账号必须是字符串' })
  account: string;

  @IsNotEmpty({ message: '密码不能为空' })
  @IsString({ message: '密码必须是字符串' })
  @MinLength(6, { message: '密码长度不能小于 6 位' })
  password: string;

  createBy: string;

  createTime: Date;

  updateTime: Date;
}
